namespace PaulRz.Util.Patterns
{
    /// <summary>
    /// Interface of running object
    /// </summary>
    public interface IRunnable
    {
        /// <summary>
        /// Get or Set if the object is in background mode
        /// </summary>
        bool IsBackground { get; set; }
        /// <summary>
        /// Get if the object is stopping
        /// </summary>
        bool IsStopping { get; }
        /// <summary>
        /// Get if the object has been stopped
        /// </summary>
        bool Stopped { get; }
        /// <summary>
        /// Starts the activity of the object
        /// </summary>
        void Start();
        /// <summary>
        /// Stops the activity of the object
        /// </summary>
        void Stop();
    }
}
